<label th:for="*{fields['__${field.name}__'].value}" th:classappend="${field.required ? 'required' : ''}" >
    <span th:utext="#{${field.friendlyName}}"></span>
<span th:replace="components/fieldTooltip" ></span>
</label>

<th:block th:if="${!#maps.isEmpty(field.options) and #maps.size(field.options) ge #props.getAsInt('admin.enum.minCountForDropDown')}">
    <select class="six" th:field="*{fields['__${field.name}__'].value}" th:disabled="${field.readOnly}">
        <option th:if="${field.allowNoValueEnumOption}" value="" th:utext="#{No_Value_Selected}"></option>
        <option th:each="entry : *{fields['__${field.name}__'].options}"
                th:value="${entry.key}"
                th:text="#{${entry.value}}" ></option>
    </select>
</th:block>

<th:block th:if="${!#maps.isEmpty(field.options) and #maps.size(field.options) lt #props.getAsInt('admin.enum.minCountForDropDown')}">
    <div class="radio-container">
        <div th:if="${field.allowNoValueEnumOption}" class="radio-option">
            <input th:field="*{fields['__${field.name}__'].value}" type="radio" class="radio" value=""/>
            <label class="radio-label" th:utext="#{No_Value_Selected}" th:classappend="${field.readOnly}? 'disabled'"></label>
        </div>

        <th:block th:each="entry : *{fields['__${field.name}__'].options}" class="radio-container">
            <div class="radio-option" th:if="*{fields['__${field.name}__'].value} == ${entry.key} or ${!field.readOnly}">
                <input th:field="*{fields['__${field.name}__'].value}" type="radio" class="radio" th:value="${entry.key}" th:disabled="${field.readOnly}"/>
                <label th:inline="text" class="radio-label" th:classappend="${field.readOnly}? 'disabled'">
                    [[${entry.value}]]
                </label>
            </div>
        </th:block>
    </div>
</th:block>

<span th:if="${#maps.isEmpty(field.options)}" th:inline="text">
    &lt;[[#{No_Records_Found_Enum}]]&gt;
</span>

<span class="error" th:errors="*{fields['__${field.name}__'].value}" ></span>
